/**
 * 
 */
package com.cp16.tss.form;

import java.awt.Color;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.logging.Level;
import java.util.logging.Logger;

import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.SwingConstants;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.border.EmptyBorder;

import com.cp16.tss.handler.RequirementHandler;
import com.toedter.calendar.JDateChooser;

/**
 * @author ADMIN
 * 
 */
public class RequirementAddNewForm extends JFrame implements ActionListener {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private JPanel contentPane;
	private JPanel panel;
	private JLabel lblAddNewRequirement;
	@SuppressWarnings("rawtypes")
	private JComboBox cbService;
	private JLabel lblService;
	private JLabel lblCustomerId;
	private JTextField txtCustomerName;
	private JTextField txtDevice1;
	private JTextField txtAmount1;
	private JTextField txtPrice1;
	private JTextField txtCustomerId;
	private JLabel lblDeadline;
	private JDateChooser txtDeadLine;
	private JLabel lblStatus;
	@SuppressWarnings("rawtypes")
	private JComboBox cbStatus;
	private JLabel lblDateRequirement;
	private JDateChooser txtDateRequirement;
	private JLabel label_1;
	private JLabel lblCustomerName;
	private JButton btnOK;
	private JButton btnCancel;
	private JLabel lblDevice;
	private JLabel lblAmount;
	private JLabel lblPrice;
	private JLabel lblVnddevice;
	private JLabel label;
	private JLabel label_2;
	private JLabel label_3;
	private JLabel label_4;
	private JCheckBox chckbxDeviceList;
	private JLabel lblPhone;
	private JTextField txtPhoneList;
	private JPanel panelDevice;
	private JTextField txtDevice2;
	private JTextField txtAmount2;
	private JTextField txtPrice2;
	private JTextField txtDevice3;
	private JTextField txtAmount3;
	private JTextField txtPrice3;
	private JTextField txtDevice4;
	private JTextField txtAmount4;
	private JTextField txtPrice4;
	private JTextField txtDevice5;
	private JTextField txtAmount5;
	private JTextField txtPrice5;

	public RequirementAddNewForm() {
		loadLookAndFeel();
		initComponents();
	}

	private void loadLookAndFeel() {
		try {
			UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
		} catch (ClassNotFoundException ex) {
			Logger.getLogger(RequirementAddNewForm.class.getName()).log(
					Level.SEVERE, null, ex);
		} catch (InstantiationException ex) {
			Logger.getLogger(RequirementAddNewForm.class.getName()).log(
					Level.SEVERE, null, ex);
		} catch (IllegalAccessException ex) {
			Logger.getLogger(RequirementAddNewForm.class.getName()).log(
					Level.SEVERE, null, ex);
		} catch (UnsupportedLookAndFeelException ex) {
			Logger.getLogger(RequirementAddNewForm.class.getName()).log(
					Level.SEVERE, null, ex);
		}
	}

	@SuppressWarnings({ "rawtypes", "unchecked" })
	public void initComponents() {
		
		setTitle("CustomerCare- created by Hoang Ngoc Giang");
		setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		setLocation(150, 70);
		setSize(980, 650);
		setResizable(false);
		contentPane = new JPanel();
		contentPane.setBackground(new Color(102, 102, 204));
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		panel = new JPanel();
		panel.setBounds(10, 11, 954, 600);
		contentPane.add(panel);
		panel.setLayout(null);
		
		lblAddNewRequirement = new JLabel("Add new a requirement");
		lblAddNewRequirement.setFont(new Font("Tahoma", Font.PLAIN, 25));
		lblAddNewRequirement.setBounds(387, 44, 324, 35);
		panel.add(lblAddNewRequirement);
		
		cbService = new JComboBox();
		cbService.setFont(new Font("Tahoma", Font.PLAIN, 13));
		cbService.setBounds(166, 124, 215, 29);
		panel.add(cbService);
		
		lblService = new JLabel("Service");
		lblService.setFont(new Font("Tahoma", Font.PLAIN, 15));
		lblService.setBounds(51, 124, 53, 29);
		panel.add(lblService);
		
		txtCustomerName = new JTextField();
		txtCustomerName.setFont(new Font("Tahoma", Font.PLAIN, 13));
		txtCustomerName.setColumns(10);
		txtCustomerName.setBounds(745, 124, 199, 29);
		txtCustomerName.setEditable(false);
		panel.add(txtCustomerName);
		
		lblCustomerId = new JLabel("Customer ID");
		lblCustomerId.setFont(new Font("Tahoma", Font.PLAIN, 15));
		lblCustomerId.setBounds(414, 124, 95, 29);
		panel.add(lblCustomerId);
		
		lblDeadline = new JLabel("DeadLine");
		lblDeadline.setHorizontalAlignment(SwingConstants.LEFT);
		lblDeadline.setFont(new Font("Tahoma", Font.PLAIN, 15));
		lblDeadline.setBounds(414, 181, 68, 29);
		panel.add(lblDeadline);
		
		txtDeadLine = new JDateChooser();
		txtDeadLine.setDateFormatString("dd/MM/yyyy");
		txtDeadLine.setFont(new Font("Tahoma", Font.PLAIN, 13));
		txtDeadLine.setBounds(519, 181, 110, 30);
		panel.add(txtDeadLine);
		
		lblStatus = new JLabel("Status");
		lblStatus.setFont(new Font("Tahoma", Font.PLAIN, 15));
		lblStatus.setBounds(685, 181, 50, 29);
		panel.add(lblStatus);
		
		cbStatus = new JComboBox();
		cbStatus.setFont(new Font("Tahoma", Font.PLAIN, 13));
		cbStatus.addItem("Request");
		cbStatus.addItem("Resolving");
		cbStatus.addItem("Resolved");
		cbStatus.addItem("Re-open");
		cbStatus.addItem("Cancel");
		cbStatus.setBounds(745, 181, 109, 29);
		panel.add(cbStatus);
		
		lblDateRequirement = new JLabel("Date Required");
		lblDateRequirement.setFont(new Font("Tahoma", Font.PLAIN, 15));
		lblDateRequirement.setBounds(51, 180, 95, 29);
		panel.add(lblDateRequirement);
		
		txtDateRequirement = new JDateChooser();
		txtDateRequirement.setFont(new Font("Tahoma", Font.PLAIN, 13));
		txtDateRequirement.setDateFormatString("dd/MM/yyyy");
		txtDateRequirement.setBounds(166, 180, 110, 30);
		panel.add(txtDateRequirement);
		
		label_1 = new JLabel("*");
		label_1.setForeground(Color.RED);
		label_1.setFont(new Font("Tahoma", Font.PLAIN, 15));
		label_1.setBounds(505, 125, 15, 29);
		panel.add(label_1);
		
		lblCustomerName = new JLabel("Name");
		lblCustomerName.setFont(new Font("Tahoma", Font.PLAIN, 15));
		lblCustomerName.setBounds(685, 124, 53, 29);
		panel.add(lblCustomerName);
		
		btnOK = new JButton("OK");
		btnOK.setBounds(415, 554, 89, 35);
		btnOK.setFont(new Font("Tahoma", Font.PLAIN, 15));
		btnOK.addActionListener(this);
		panel.add(btnOK);
		
		btnCancel = new JButton("Cancel");
		btnCancel.setFont(new Font("Tahoma", Font.PLAIN, 15));
		btnCancel.setBounds(514, 554, 89, 35);
		btnCancel.addActionListener(this);
		panel.add(btnCancel);
		
		label = new JLabel("*");
		label.setForeground(Color.RED);
		label.setFont(new Font("Tahoma", Font.PLAIN, 15));
		label.setBounds(152, 124, 15, 29);
		panel.add(label);
		
		label_2 = new JLabel("*");
		label_2.setForeground(Color.RED);
		label_2.setFont(new Font("Tahoma", Font.PLAIN, 15));
		label_2.setBounds(152, 180, 15, 29);
		panel.add(label_2);
		
		label_3 = new JLabel("*");
		label_3.setForeground(Color.RED);
		label_3.setFont(new Font("Tahoma", Font.PLAIN, 15));
		label_3.setBounds(731, 181, 15, 29);
		panel.add(label_3);
		
		label_4 = new JLabel("*");
		label_4.setForeground(Color.RED);
		label_4.setFont(new Font("Tahoma", Font.PLAIN, 15));
		label_4.setBounds(504, 182, 15, 29);
		panel.add(label_4);
		
		txtCustomerId = new JTextField();
		txtCustomerId.setFont(new Font("Tahoma", Font.PLAIN, 13));
		txtCustomerId.setColumns(10);
		txtCustomerId.setBounds(519, 124, 110, 29);
		panel.add(txtCustomerId);
		
		chckbxDeviceList = new JCheckBox("Device list");
		chckbxDeviceList.setFont(new Font("Tahoma", Font.PLAIN, 15));
		chckbxDeviceList.setBounds(44, 308, 102, 29);
		chckbxDeviceList.addActionListener(this);
		panel.add(chckbxDeviceList);
		
		lblPhone = new JLabel("Phone");
		lblPhone.setFont(new Font("Tahoma", Font.PLAIN, 15));
		lblPhone.setBounds(51, 243, 95, 29);
		panel.add(lblPhone);
		
		txtPhoneList = new JTextField();
		txtPhoneList.setFont(new Font("Tahoma", Font.PLAIN, 13));
		txtPhoneList.setColumns(10);
		txtPhoneList.setBounds(166, 243, 778, 29);
		panel.add(txtPhoneList);
		
		panelDevice = new JPanel();
		panelDevice.setBounds(166, 297, 788, 233);
		panel.add(panelDevice);
		panelDevice.setLayout(null);
		
		txtDevice1 = new JTextField();
		txtDevice1.setFont(new Font("Tahoma", Font.PLAIN, 13));
		txtDevice1.setBounds(0, 40, 292, 29);
		panelDevice.add(txtDevice1);
		txtDevice1.setColumns(10);
		
		lblAmount = new JLabel("Amount");
		lblAmount.setBounds(372, 0, 68, 29);
		panelDevice.add(lblAmount);
		lblAmount.setFont(new Font("Tahoma", Font.PLAIN, 15));
		
		txtAmount1 = new JTextField();
		txtAmount1.setFont(new Font("Tahoma", Font.PLAIN, 13));
		txtAmount1.setBounds(351, 40, 110, 29);
		panelDevice.add(txtAmount1);
		txtAmount1.setColumns(10);
		
		lblPrice = new JLabel("Price");
		lblPrice.setBounds(605, 0, 43, 29);
		panelDevice.add(lblPrice);
		lblPrice.setFont(new Font("Tahoma", Font.PLAIN, 15));
		
		txtPrice1 = new JTextField();
		txtPrice1.setFont(new Font("Tahoma", Font.PLAIN, 13));
		txtPrice1.setBounds(579, 40, 110, 29);
		panelDevice.add(txtPrice1);
		txtPrice1.setColumns(10);
		
		lblVnddevice = new JLabel("VND/Device");
		lblVnddevice.setBounds(699, 118, 89, 29);
		panelDevice.add(lblVnddevice);
		lblVnddevice.setFont(new Font("Tahoma", Font.PLAIN, 15));
		
		lblDevice = new JLabel("Device name");
		lblDevice.setBounds(71, 0, 94, 29);
		panelDevice.add(lblDevice);
		lblDevice.setFont(new Font("Tahoma", Font.PLAIN, 15));
		
		txtDevice2 = new JTextField();
		txtDevice2.setFont(new Font("Tahoma", Font.PLAIN, 13));
		txtDevice2.setColumns(10);
		txtDevice2.setBounds(0, 80, 292, 29);
		panelDevice.add(txtDevice2);
		
		txtAmount2 = new JTextField();
		txtAmount2.setFont(new Font("Tahoma", Font.PLAIN, 13));
		txtAmount2.setColumns(10);
		txtAmount2.setBounds(351, 80, 110, 29);
		panelDevice.add(txtAmount2);
		
		txtPrice2 = new JTextField();
		txtPrice2.setFont(new Font("Tahoma", Font.PLAIN, 13));
		txtPrice2.setColumns(10);
		txtPrice2.setBounds(579, 80, 110, 29);
		panelDevice.add(txtPrice2);
		
		txtDevice3 = new JTextField();
		txtDevice3.setFont(new Font("Tahoma", Font.PLAIN, 13));
		txtDevice3.setColumns(10);
		txtDevice3.setBounds(0, 118, 292, 29);
		panelDevice.add(txtDevice3);
		
		txtAmount3 = new JTextField();
		txtAmount3.setFont(new Font("Tahoma", Font.PLAIN, 13));
		txtAmount3.setColumns(10);
		txtAmount3.setBounds(351, 118, 110, 29);
		panelDevice.add(txtAmount3);
		
		txtPrice3 = new JTextField();
		txtPrice3.setFont(new Font("Tahoma", Font.PLAIN, 13));
		txtPrice3.setColumns(10);
		txtPrice3.setBounds(579, 118, 110, 29);
		panelDevice.add(txtPrice3);
		
		txtDevice4 = new JTextField();
		txtDevice4.setFont(new Font("Tahoma", Font.PLAIN, 13));
		txtDevice4.setColumns(10);
		txtDevice4.setBounds(0, 156, 292, 29);
		panelDevice.add(txtDevice4);
		
		txtAmount4 = new JTextField();
		txtAmount4.setFont(new Font("Tahoma", Font.PLAIN, 13));
		txtAmount4.setColumns(10);
		txtAmount4.setBounds(351, 156, 110, 29);
		panelDevice.add(txtAmount4);
		
		txtPrice4 = new JTextField();
		txtPrice4.setFont(new Font("Tahoma", Font.PLAIN, 13));
		txtPrice4.setColumns(10);
		txtPrice4.setBounds(579, 156, 110, 29);
		panelDevice.add(txtPrice4);
		
		txtDevice5 = new JTextField();
		txtDevice5.setFont(new Font("Tahoma", Font.PLAIN, 13));
		txtDevice5.setColumns(10);
		txtDevice5.setBounds(0, 195, 292, 29);
		panelDevice.add(txtDevice5);
		panelDevice.setVisible(false);
		
		txtAmount5 = new JTextField();
		txtAmount5.setFont(new Font("Tahoma", Font.PLAIN, 13));
		txtAmount5.setColumns(10);
		txtAmount5.setBounds(351, 195, 110, 29);
		panelDevice.add(txtAmount5);
		
		txtPrice5 = new JTextField();
		txtPrice5.setFont(new Font("Tahoma", Font.PLAIN, 13));
		txtPrice5.setColumns(10);
		txtPrice5.setBounds(579, 195, 110, 29);
		panelDevice.add(txtPrice5);
		
	}

	/**
	 * @return the lblAddNewRequirement
	 */
	public JLabel getLblAddNewRequirement() {
		return lblAddNewRequirement;
	}

	/**
	 * @param lblAddNewRequirement
	 *            the lblAddNewRequirement to set
	 */
	public void setLblAddNewRequirement(JLabel lblAddNewRequirement) {
		this.lblAddNewRequirement = lblAddNewRequirement;
	}

	/**
	 * @return the cbService
	 */
	@SuppressWarnings("rawtypes")
	public JComboBox getCbService() {
		return cbService;
	}

	/**
	 * @param cbService
	 *            the cbService to set
	 */
	@SuppressWarnings("rawtypes")
	public void setCbService(JComboBox cbService) {
		this.cbService = cbService;
	}

	/**
	 * @return the lblService
	 */
	public JLabel getLblService() {
		return lblService;
	}

	/**
	 * @param lblService
	 *            the lblService to set
	 */
	public void setLblService(JLabel lblService) {
		this.lblService = lblService;
	}

	/**
	 * @return the lblCustomerId
	 */
	public JLabel getLblCustomerId() {
		return lblCustomerId;
	}

	/**
	 * @param lblCustomerId
	 *            the lblCustomerId to set
	 */
	public void setLblCustomerId(JLabel lblCustomerId) {
		this.lblCustomerId = lblCustomerId;
	}

	/**
	 * @return the txtCustomerName
	 */
	public JTextField getTxtCustomerName() {
		return txtCustomerName;
	}

	/**
	 * @param txtCustomerName
	 *            the txtCustomerName to set
	 */
	public void setTxtCustomerName(JTextField txtCustomerName) {
		this.txtCustomerName = txtCustomerName;
	}

	/**
	 * @return the txtDevice1
	 */
	public JTextField getTxtDevice1() {
		return txtDevice1;
	}

	/**
	 * @param txtDevice1
	 *            the txtDevice1 to set
	 */
	public void setTxtDevice1(JTextField txtDevice1) {
		this.txtDevice1 = txtDevice1;
	}

	/**
	 * @return the txtAmount1
	 */
	public JTextField getTxtAmount1() {
		return txtAmount1;
	}

	/**
	 * @param txtAmount1
	 *            the txtAmount1 to set
	 */
	public void setTxtAmount1(JTextField txtAmount1) {
		this.txtAmount1 = txtAmount1;
	}

	/**
	 * @return the txtPrice1
	 */
	public JTextField getTxtPrice1() {
		return txtPrice1;
	}

	/**
	 * @param txtPrice1
	 *            the txtPrice1 to set
	 */
	public void setTxtPrice1(JTextField txtPrice1) {
		this.txtPrice1 = txtPrice1;
	}

	/**
	 * @return the txtCustomerId
	 */
	public JTextField getTxtCustomerId() {
		return txtCustomerId;
	}

	/**
	 * @param txtCustomerId
	 *            the txtCustomerId to set
	 */
	public void setTxtCustomerId(JTextField txtCustomerId) {
		this.txtCustomerId = txtCustomerId;
	}

	/**
	 * @return the lblDeadline
	 */
	public JLabel getLblDeadline() {
		return lblDeadline;
	}

	/**
	 * @param lblDeadline
	 *            the lblDeadline to set
	 */
	public void setLblDeadline(JLabel lblDeadline) {
		this.lblDeadline = lblDeadline;
	}

	/**
	 * @return the txtDeadLine
	 */
	public JDateChooser getTxtDeadLine() {
		return txtDeadLine;
	}

	/**
	 * @param txtDeadLine
	 *            the txtDeadLine to set
	 */
	public void setTxtDeadLine(JDateChooser txtDeadLine) {
		this.txtDeadLine = txtDeadLine;
	}

	/**
	 * @return the lblStatus
	 */
	public JLabel getLblStatus() {
		return lblStatus;
	}

	/**
	 * @param lblStatus
	 *            the lblStatus to set
	 */
	public void setLblStatus(JLabel lblStatus) {
		this.lblStatus = lblStatus;
	}

	/**
	 * @return the cbStatus
	 */
	@SuppressWarnings("rawtypes")
	public JComboBox getCbStatus() {
		return cbStatus;
	}

	/**
	 * @param cbStatus
	 *            the cbStatus to set
	 */
	@SuppressWarnings("rawtypes")
	public void setCbStatus(JComboBox cbStatus) {
		this.cbStatus = cbStatus;
	}

	/**
	 * @return the lblDateRequirement
	 */
	public JLabel getLblDateRequirement() {
		return lblDateRequirement;
	}

	/**
	 * @param lblDateRequirement
	 *            the lblDateRequirement to set
	 */
	public void setLblDateRequirement(JLabel lblDateRequirement) {
		this.lblDateRequirement = lblDateRequirement;
	}

	/**
	 * @return the txtDateRequirement
	 */
	public JDateChooser getTxtDateRequirement() {
		return txtDateRequirement;
	}

	/**
	 * @param txtDateRequirement
	 *            the txtDateRequirement to set
	 */
	public void setTxtDateRequirement(JDateChooser txtDateRequirement) {
		this.txtDateRequirement = txtDateRequirement;
	}

	/**
	 * @return the label_1
	 */
	public JLabel getLabel_1() {
		return label_1;
	}

	/**
	 * @param label_1
	 *            the label_1 to set
	 */
	public void setLabel_1(JLabel label_1) {
		this.label_1 = label_1;
	}

	/**
	 * @return the lblCustomerName
	 */
	public JLabel getLblCustomerName() {
		return lblCustomerName;
	}

	/**
	 * @param lblCustomerName
	 *            the lblCustomerName to set
	 */
	public void setLblCustomerName(JLabel lblCustomerName) {
		this.lblCustomerName = lblCustomerName;
	}

	/**
	 * @return the btnOK
	 */
	public JButton getBtnOK() {
		return btnOK;
	}

	/**
	 * @param btnOK
	 *            the btnOK to set
	 */
	public void setBtnOK(JButton btnOK) {
		this.btnOK = btnOK;
	}

	/**
	 * @return the btnCancel
	 */
	public JButton getBtnCancel() {
		return btnCancel;
	}

	/**
	 * @param btnCancel
	 *            the btnCancel to set
	 */
	public void setBtnCancel(JButton btnCancel) {
		this.btnCancel = btnCancel;
	}

	/**
	 * @return the lblDevice
	 */
	public JLabel getLblDevice() {
		return lblDevice;
	}

	/**
	 * @param lblDevice
	 *            the lblDevice to set
	 */
	public void setLblDevice(JLabel lblDevice) {
		this.lblDevice = lblDevice;
	}

	/**
	 * @return the lblAmount
	 */
	public JLabel getLblAmount() {
		return lblAmount;
	}

	/**
	 * @param lblAmount
	 *            the lblAmount to set
	 */
	public void setLblAmount(JLabel lblAmount) {
		this.lblAmount = lblAmount;
	}

	/**
	 * @return the lblPrice
	 */
	public JLabel getLblPrice() {
		return lblPrice;
	}

	/**
	 * @param lblPrice
	 *            the lblPrice to set
	 */
	public void setLblPrice(JLabel lblPrice) {
		this.lblPrice = lblPrice;
	}

	/**
	 * @return the lblVnddevice
	 */
	public JLabel getLblVnddevice() {
		return lblVnddevice;
	}

	/**
	 * @param lblVnddevice
	 *            the lblVnddevice to set
	 */
	public void setLblVnddevice(JLabel lblVnddevice) {
		this.lblVnddevice = lblVnddevice;
	}

	/**
	 * @return the label
	 */
	public JLabel getLabel() {
		return label;
	}

	/**
	 * @param label
	 *            the label to set
	 */
	public void setLabel(JLabel label) {
		this.label = label;
	}

	/**
	 * @return the label_2
	 */
	public JLabel getLabel_2() {
		return label_2;
	}

	/**
	 * @param label_2
	 *            the label_2 to set
	 */
	public void setLabel_2(JLabel label_2) {
		this.label_2 = label_2;
	}

	/**
	 * @return the label_3
	 */
	public JLabel getLabel_3() {
		return label_3;
	}

	/**
	 * @param label_3
	 *            the label_3 to set
	 */
	public void setLabel_3(JLabel label_3) {
		this.label_3 = label_3;
	}

	/**
	 * @return the label_4
	 */
	public JLabel getLabel_4() {
		return label_4;
	}

	/**
	 * @param label_4
	 *            the label_4 to set
	 */
	public void setLabel_4(JLabel label_4) {
		this.label_4 = label_4;
	}

	/**
	 * @return the chckbxDeviceList
	 */
	public JCheckBox getChckbxDeviceList() {
		return chckbxDeviceList;
	}

	/**
	 * @param chckbxDeviceList
	 *            the chckbxDeviceList to set
	 */
	public void setChckbxDeviceList(JCheckBox chckbxDeviceList) {
		this.chckbxDeviceList = chckbxDeviceList;
	}

	/**
	 * @return the lblPhone
	 */
	public JLabel getLblPhone() {
		return lblPhone;
	}

	/**
	 * @param lblPhone
	 *            the lblPhone to set
	 */
	public void setLblPhone(JLabel lblPhone) {
		this.lblPhone = lblPhone;
	}

	/**
	 * @return the txtPhoneList
	 */
	public JTextField getTxtPhoneList() {
		return txtPhoneList;
	}

	/**
	 * @param txtPhoneList
	 *            the txtPhoneList to set
	 */
	public void setTxtPhoneList(JTextField txtPhoneList) {
		this.txtPhoneList = txtPhoneList;
	}

	/**
	 * @return the txtDevice2
	 */
	public JTextField getTxtDevice2() {
		return txtDevice2;
	}

	/**
	 * @param txtDevice2
	 *            the txtDevice2 to set
	 */
	public void setTxtDevice2(JTextField txtDevice2) {
		this.txtDevice2 = txtDevice2;
	}

	/**
	 * @return the txtAmount2
	 */
	public JTextField getTxtAmount2() {
		return txtAmount2;
	}

	/**
	 * @param txtAmount2
	 *            the txtAmount2 to set
	 */
	public void setTxtAmount2(JTextField txtAmount2) {
		this.txtAmount2 = txtAmount2;
	}

	/**
	 * @return the txtPrice2
	 */
	public JTextField getTxtPrice2() {
		return txtPrice2;
	}

	/**
	 * @param txtPrice2
	 *            the txtPrice2 to set
	 */
	public void setTxtPrice2(JTextField txtPrice2) {
		this.txtPrice2 = txtPrice2;
	}

	/**
	 * @return the txtDevice3
	 */
	public JTextField getTxtDevice3() {
		return txtDevice3;
	}

	/**
	 * @param txtDevice3
	 *            the txtDevice3 to set
	 */
	public void setTxtDevice3(JTextField txtDevice3) {
		this.txtDevice3 = txtDevice3;
	}

	/**
	 * @return the txtAmount3
	 */
	public JTextField getTxtAmount3() {
		return txtAmount3;
	}

	/**
	 * @param txtAmount3
	 *            the txtAmount3 to set
	 */
	public void setTxtAmount3(JTextField txtAmount3) {
		this.txtAmount3 = txtAmount3;
	}

	/**
	 * @return the txtPrice3
	 */
	public JTextField getTxtPrice3() {
		return txtPrice3;
	}

	/**
	 * @param txtPrice3
	 *            the txtPrice3 to set
	 */
	public void setTxtPrice3(JTextField txtPrice3) {
		this.txtPrice3 = txtPrice3;
	}

	/**
	 * @return the txtDevice4
	 */
	public JTextField getTxtDevice4() {
		return txtDevice4;
	}

	/**
	 * @param txtDevice4
	 *            the txtDevice4 to set
	 */
	public void setTxtDevice4(JTextField txtDevice4) {
		this.txtDevice4 = txtDevice4;
	}

	/**
	 * @return the txtAmount4
	 */
	public JTextField getTxtAmount4() {
		return txtAmount4;
	}

	/**
	 * @param txtAmount4
	 *            the txtAmount4 to set
	 */
	public void setTxtAmount4(JTextField txtAmount4) {
		this.txtAmount4 = txtAmount4;
	}

	/**
	 * @return the txtPrice4
	 */
	public JTextField getTxtPrice4() {
		return txtPrice4;
	}

	/**
	 * @param txtPrice4
	 *            the txtPrice4 to set
	 */
	public void setTxtPrice4(JTextField txtPrice4) {
		this.txtPrice4 = txtPrice4;
	}

	/**
	 * @return the txtDevice5
	 */
	public JTextField getTxtDevice5() {
		return txtDevice5;
	}

	/**
	 * @param txtDevice5
	 *            the txtDevice5 to set
	 */
	public void setTxtDevice5(JTextField txtDevice5) {
		this.txtDevice5 = txtDevice5;
	}

	/**
	 * @return the txtAmount5
	 */
	public JTextField getTxtAmount5() {
		return txtAmount5;
	}

	/**
	 * @param txtAmount5
	 *            the txtAmount5 to set
	 */
	public void setTxtAmount5(JTextField txtAmount5) {
		this.txtAmount5 = txtAmount5;
	}

	/**
	 * @return the txtPrice5
	 */
	public JTextField getTxtPrice5() {
		return txtPrice5;
	}

	/**
	 * @param txtPrice5
	 *            the txtPrice5 to set
	 */
	public void setTxtPrice5(JTextField txtPrice5) {
		this.txtPrice5 = txtPrice5;
	}

	
	/**
	 * @return the panel
	 */
	public JPanel getPanel() {
		return panel;
	}

	/**
	 * @param panel the panel to set
	 */
	public void setPanel(JPanel panel) {
		this.panel = panel;
	}

	/**
	 * @return the panelDevice
	 */
	public JPanel getPanelDevice() {
		return panelDevice;
	}

	/**
	 * @param panelDevice the panelDevice to set
	 */
	public void setPanelDevice(JPanel panelDevice) {
		this.panelDevice = panelDevice;
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		RequirementHandler requirementHandler = new RequirementHandler();
		if (e.getSource() == btnOK) {
			requirementHandler.addNewRequirement(this);
		} else if (e.getSource() == chckbxDeviceList) {
			requirementHandler.doSomethingWhenCheck(this);
		} else {
			requirementHandler.doClearRequirementAddNewForm(this);
		}
	}
}
